package JmmAndMultiThread.MultiThreads;

public class MultiThreadJoin {
    public static void main(String[] args) throws InterruptedException {
        Thread threadA = new Thread(() -> {
            System.out.println("Thread = [" + "A" + "]");
        });
        Thread threadB = new Thread(() -> {
            System.out.println("Thread = [" + "B" + "]");
        });
        Thread threadC = new Thread(() -> {
            System.out.println("Thread = [" + "C" + "]");
        });
        Thread threadD = new Thread(() -> {
            System.out.println("Thread = [" + "D" + "]");
        });
        //join();

        threadA.start();threadA.join();
        threadB.start();threadB.join();
        threadC.start();threadC.join();
        threadD.start();threadD.join();
    }
}
